<?php
// +----------------------------------------------------------------------
// | OneThink [ WE CAN DO IT JUST THINK IT ]
// +----------------------------------------------------------------------
// | Copyright (c) 2013 http://www.onethink.cn All rights reserved.
// +----------------------------------------------------------------------
// | Author: huajie <banhuajie@163.com>
// +----------------------------------------------------------------------

namespace Home\Model;
use Think\Model;

/**
 * URL模型
 * @author huajie <banhuajie@163.com>
 */

class YwlbModel extends Model {
    //获取权限
    /*
    * 3、门店经理  4、获取客服 5、线下门市 6、线上经理 7、老板 8、线上门市
    */

    /**
    *业务状态，判断权限后
    */
    public function yw($group){
        //获取权限
        if($group === 4){
            $data['lb']     = array('in','33,63');
        }
        $data['status'] = array('eq',1);
        $data['lb']     = array('eq',3);
        $ywzt = $this->where($data)->field('uid,name')->select();
 
        return $ywzt;
    }
    /**
    *获取渠道
    */
    public function qd(){
        $newqdzt = $this->where(array('status'=>1,'lb'=>1))->field('uid,name')->select();
        return $newqdzt;
    }
    /**
    *获取类别
    */
    public function lb(){
        $newlb = $this->where(array('status'=>1,'lb'=>2))->field('uid,name')->select();
        return $newlb;
    }
    /*
    * 微信通知
    */
    public function wxtz($id){
        $wxbb   = new WxbbController;
        $wxbb->xsjdtixing($id); 
    }
   
        
}
